
export default {
  namespaced: true,
  state: {
    allPrice1: 0,
    // orderListPrice: 0,
    payAmountPrice: 0,
  },
  mutations: {
    ADD_PRICE_MUTATIONS(state, payload) { // 总价
      state.allPrice1 = 0;
      payload.forEach(item => {
        state.allPrice1 += ((item.price) * (item.contentCount) * 1000) / 1000;
      });
    },
    ADD_RECEIVABLES_MUTATIONS1(state, payload) { // 应收款-商品-orderList
      state.allPrice1 = 0;
      payload.forEach(item => {
        state.allPrice1 += ((item.price) * (item.contentCount) * 1000) / 1000;
      });
    },
    ADD_RECEIVABLES_MUTATIONS2(state, payload) { // 应收款-已经支付款额度payAmount
      state.payAmountPrice = 0;
      payload.forEach(item => {
        state.payAmountPrice += ((item.payAmount) * 1000) / 1000;
      });
    },
    ADD_RECEIVABLES_MUTATIONS3(state) { // 应收款-已经支付款额度payAmount
      state.payAmountPrice = 0;
      state.orderListPrice = 0;
    },
  },
};
